package com.example.administrator.im.db;

import android.util.Log;

import org.litepal.LitePal;
import org.litepal.crud.LitePalSupport;

import java.util.List;

/**
 * create:2018/10/17 10:07
 * author: 姚鸿杰
 **/
public class GroupDBHelper extends LitePalSupport {
    private int id;

    private int position;

    private String name;

    private boolean default_group;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isDefault_group() {
        return default_group;
    }

    public void setDefault_group(boolean default_group) {
        this.default_group = default_group;
    }

    public List<FriendDBHelper> getFriends() {
        return LitePal.where("group_id = ?", String.valueOf(id)).find(FriendDBHelper.class);
    }

}
